<template>
	<div id="new-interest">
		<component :is="currentView" :msg="msg" :secMsg="secmsg"></component>
		<!--动态组件，is和特定的结构<component>来生成动态组件-->
		<interest :xdata="xdata"></interest>
		<!--调用interest子组件并自定义参数-->
	</div>
</template>

<script>
	import Interest from 'components/interest';
	import newData from 'static/data/data.json';
	import Button from 'components/button';
	export default {
		data() {
			return {
				xdata:newData.interest.course,
				currentView:'mybutton',
				msg:"我是动态组件",
				secmsg:"我是第二个参数",
			}
		},
		name: 'new-interest',
		components: {
			'interest': Interest,
			'mybutton':Button,
		},
		
	}
</script>

<style>

</style>